﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace JuCheap.Core.Models.ViewModels
{
    public class OrganizationViewModel
    {
        public int Id { get; set; }
        /// <summary>
        /// 机构名
        /// </summary>
        [Display(Name = "机构名称")]
        [Required(ErrorMessage = Message.Required)]
        [MinLength(2, ErrorMessage = Message.MinLength)]
        [MaxLength(20, ErrorMessage = Message.MaxLength)]
        public string Name { get; set; }

        /// <summary>
        /// 机构地址
        /// </summary>
        [Display(Name = "机构地址")]
        [Required(ErrorMessage = Message.Required)]
        public string Address { get; set; }

        /// <summary>
        /// 联系人
        /// </summary>
        [Display(Name = "联系人")]
        public string Contact { get; set; }

        /// <summary>
        /// 联系电话
        /// </summary>
        [Display(Name = "联系电话")]
        [Required(ErrorMessage = Message.Required)]
        [RegularExpression(@"^1\d{10}$", ErrorMessage = "联系电话11位"),  StringLength(11)]
        public string ContactPhoneNumber { get; set; }

    
        [Display(Name = "状态")]
        public int Status { get; set; }

        public string State { get; set; }

    }
}
